<template>
	<div class="m_r">
		<header class="top_bar">
			<a onclick="window.history.go(-1)" class="icon_back"></a>
			<h3 class="cartname">物流信息</h3>
		</header>
		<main class="user_login_box" style="padding-bottom: 20px;height: auto;">
			<div class="background_fff pad10">
				<div class="line_height40">
					<span>运单号：</span>
					<span>{{orderInfo.ExpressNum}}</span>
				</div>
				<div class="line_height40">
					<span>国内承运人：</span>
					<span>{{orderInfo.ExpressName}}</span>
				</div>
			</div>
			<div class="" style="clear: both;">
			</div>
		</main>
	</div>
</template>
<script>
	import { Toast } from 'mint-ui';
	
	export default {
		data() {
			return {
				orderId: '',
				orderInfo: {}
			}
		},
		mounted() {
			let _this = this
			_this.orderId = _this.$route.query.orderId
			_this.getInitData(_this.orderId)
		},
		methods: {
			getInitData(id) {
				let _this = this
				_this.$http.get('/client/Orders/'+id, null, localStorage.Authorization, res => {
					console.log('获取单个订单信息res', res)
					console.log('res.data.Id', res.data.Id )
					
					res.data.Id = res.data.Id.toString()
					console.log('res.data.Id', res.data.Id )
					
					if(res.code === 200) {
						_this.orderInfo = res.data
						console.log('orderInfo.ExpressName', _this.orderInfo.ExpressName )
					} else if(res.code === 101) {
//						localStorage.fromPath = _this.$route.fullPath
//						_this.$router.push({
//							path: '/login'
//						})
					}
				})
			}
			
		}
	}
</script>
<style>
	@import '../assets/css/login.css';
</style>
<style scoped="scoped">
	
</style>